<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>

<h1 class="page-header">用户反馈</h1>


<table class="table table-striped table-bordered">
    <tr>
        <th>编号</th>
        <th>发表用户</th>
        <th>发表时间</th>

        <th>内容</th>
        <th>操作</th>

    </tr>
<#list list as i>
    <tr>
        <td>
        ${i.id}
        </td>
        <td>
        ${i.fromUserName!}
        </td>
        <td>
        ${i.createTime?string('yyyy-MM-dd HH:mm')}
        </td>
        <td>
        ${i.content}
        </td>
        <td>
            <form action="/feedback/delete/${i.id}" form-ajax forward=" ">
                <button class="btn btn-xs btn-danger">删除</button>
            </form>
        </td>

    </tr>
</#list>
</table>

<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/laypage/laypage.js"></script>
<script type="text/javascript" src="/static/js/form-ajax.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.validate.min.js"></script>
<script type="text/javascript">
    function toggleSelectAll(self,$sel){
        if(self.checked)
            $sel.each(function(){
                if(!this.checked) $(this).click();
            });
        else{
            $sel.each(function(){
                if(this.checked) $(this).click();
            });
        }
    }
    function del(id){
        if(confirm('确认删除此记录？'))
            $.post('/user/del',{
                id:id
            },function(data){
                if(data){
                    alert('操作成功');location.reload();
                }
                else{
                    alert('操作失败')
                }
            },'json');
    }
</script>
</body>
</html>